先備知識

何謂演算法?

  • 演算法 = 解決問題的方法
  • 程式實作程序: 演算法 -> sudo code (算complexity) -> 程式語言(just查表、書)
  • 不要為了學語言而學語言(C++, Java, Python...),要學習解決問題的方法

System life circle

例: 如何實作搜尋引擎System?

1. Requirement:

了解Input & Output 還有 所要達到的功能
  1. 網路爬蟲把所有網頁載下來
  2. 分析網頁建關鍵字、index
  3. query(詢問) result

使用者面向:

  1. query(詢問) word
  2. return web pages

2. Analysis:

  • Bad / Bottom-up
  • Nice / Top-down 巨觀看要做的是什麼System最後進入微觀

3. Design:

  • ADT (abstract data types) 抽象資料型別

    為了擺脫和implement緊密連結,實現implementation-independent,簡單寫出他的concept,不要被執行的城市搞得太複雜

  • Algorithms

    1. Input
    2. Output
    3. 有限的步驟完成目的

4. Refinement & Coding:

5. Verification:

  • testing正確性、有效性(100個搜索和1萬個搜索差別?) 可能memory爆掉
  • 寫 Error-Code, Comment

6. 注意:

  • Code readable?
  • 有效運用storage
  • Running time越小越好

其他

Unix 全用C寫出來的!

  1. 寫Android App / Java

  2. 寫IOS App / Object-C

  1. 大學 = 學習知識

  2. 研究所 = 創造知識

results matching ""

    No results matching ""